package com.chinawayltd.ews.sample.job;

import org.quartz.JobExecutionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.chinawayltd.ews.sample.service.SynchroDeleteDataService;
import com.chinawayltd.ews.sample.taskCenter.TaskJob;

/**
 * @program: greeProject-timingTaskCenter
 * @description 删除数据定时器
 * @author: chenxin
 * @create: 2018年6月12日 下午7:45:28
 */
@Component
public class SynchroDeleteDataJob implements TaskJob {

    private static Logger logger = LoggerFactory.getLogger(SynchroDeleteDataJob.class);

    @Autowired
    private SynchroDeleteDataService synchroDeleteDataService;
    @Override
    public void doJob(JobExecutionContext context) {
        try {
        	synchroDeleteDataService.synchroDeleteData();
        } catch (Exception e) {
            logger.error("删除数据发生错误！", e);
        }
    }

}
